{% extends "base.html" %}

{% block title %}ePubHost - Search Results{% endblock %}

{% block content %}
    {% if private_show %}
        <H2>{{private_count}} Private Results</H2>
        <div class="search_results">
            <OL>
            {% for result in private_results %}
                <LI>{{result.internal.epub.title}}:
                <a href='/view/{{result.internal.epub.key.id}}/{{result.internal.path}}'>{{result.internal.name}}</a>
                {% for snippet in result.snippets %}
                    <div class="search_snippet">{{snippet.value|safe}}</div>
                {% endfor %}
            {% endfor %}
            </OL>
        </div>
    {% endif %}
    {% if public_show %}
        <H2>{{public_count}} Public Results</H2>
        <div class="search_results">
            <OL>
            {% for result in public_results %}
                <LI>{{result.internal.epub.title}}:
                <a href='/view/{{result.internal.epub.key.id}}/{{result.internal.path}}'>{{result.internal.name}}</a>
                {% for snippet in result.snippets %}
                    <div class="search_snippet">{{snippet.value|safe}}</div>
                {% endfor %}
            {% endfor %}
            </OL>
        </div>
    {% endif %}
{% endblock %}